import request from '@/axios/axios.js'

// 查询
export const searchApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/deviceMaintenanceUpgradeSetting/getPage',
        data: params
    })
}
export const updateApi = (params) => {
    return request({
        method: 'put',
        url: '/dms/deviceMaintenanceUpgradeSetting/update',
        data: params
    })
}
export const addApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/deviceMaintenanceUpgradeSetting/save',
        data: params
    })
}

export const deleteApi= (params) => {
    return request({
        method: 'delete',
        url: '/dms/deviceMaintenanceUpgradeSetting/delete',
        data:params,
    })
}

export const changeState= (params,state) => {
    return request({
        method: 'PUT',
        url: state ?'/dms/deviceMaintenanceUpgradeSetting/setEnable':'/dms/deviceMaintenanceUpgradeSetting/setDisable',
        data: params
    })
}
export const getDetail= (params) => {
    return request({
        method: 'get',
        url:'/dms/deviceMaintenanceUpgradeSetting/getMoldCodeList',
        params: params
    })
}
export const disabled= (params,type) => {
    return request({
        method: 'put',
        url: type ==true ? '/dms/deviceMaintenanceUpgradeSetting/setDisable':'/dms/deviceMaintenanceUpgradeSetting/setEnable',
        params: params
    })
}

